package servbean;

import java.util.ArrayList;
import java.util.List; 

public class Table {
private int row;
private int column;
private String rowHeight[];
private String columnWidth[];
private List<int[]> where = new ArrayList<int[]>();

public boolean setModel(String[] rowHeight,String[] columnWidth,List<int[]> where){
	boolean is=false;
	this.row=rowHeight.length;
	this.column=columnWidth.length;
	this.rowHeight=rowHeight;
	this.columnWidth=columnWidth;
	this.where=where;
	
		boolean flag = false;
		for (int[] item : where) {
			if (item[0] + item[2] > column || item[1] + item[3] > row) {
				flag = true;
				break;
			}
		}
		if (!flag)
			is = true;
	
	return is;
}

public int getRow() {
	return row;
}

public void setRow(int row) {
	this.row = row;
}

public int getColumn() {
	return column;
}

public void setColumn(int column) {
	this.column = column;
}

public String[] getRowHeight() {
	return rowHeight;
}

public void setRowHeight(String[] rowHeight) {
	this.rowHeight = rowHeight;
}

public String[] getColumnWidth() {
	return columnWidth;
}

public void setColumnWidth(String[] columnWidth) {
	this.columnWidth = columnWidth;
}

public List<int[]> getWhere() {
	return where;
}

public void setWhere(List<int[]> where) {
	this.where = where;
}
public static void main(String[] a) {
	// TODO Auto-generated method stub
	String s = "dd2";
	System.out.println(s.substring(s.length()-1));
}
}
